package com.sanrxteam.upload.DB;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

import com.mysql.jdbc.Driver;

//
public class SrtDb {

	/**private STRING s_Path;  //字幕保存路径
	private STRING s_filmName;  //电影名称
	private STRING s_Title;  //字幕标题
	private STRING s_Language;  //字幕语言
	private STRING s_Format;  //字幕格式
	private STRING s_Producer;  //制作人
	private STRING s_Checker;  //校订人
	private STRING s_Source;  //字幕来源
	private STRING s_Comment; //备注  
	private STRING s_data;  //日期
	private STRING s_downs   //下载次数
	 * @throws Exception 
	*/
	public void addSrt(String userName,String s_Path,String s_filmName,String s_Title,String s_Language,
			String s_Format,String s_Producer,String s_Checker,String s_Source,String s_Comment,
			String s_Data,String s_Downs) throws Exception {
		Connection conn = null;
		PreparedStatement sttm = null;
		User u = null;
		ResultSet rs = null;
		conn = DBUtils.getConnection();
			
		sttm = conn.prepareStatement("INSERT INTO srt VALUES(?,?,?,?,?,?,?,?,?,?,?,?)");
		sttm.setString(1, userName);
		sttm.setString(2, s_Path);
		sttm.setString(3, s_filmName);
		sttm.setString(4, s_Title);
		sttm.setString(5, s_Language);
		sttm.setString(6, s_Format);
		sttm.setString(7, s_Producer);
		sttm.setString(8, s_Checker);
		sttm.setString(9, s_Source);
		sttm.setString(10, s_Comment);
		sttm.setString(11, s_Data);
		sttm.setString(12, s_Downs);
		sttm.executeUpdate();
		
	}

}
